package com.zone.mybatis.transaction.jdbc;

import com.zone.mybatis.session.TransactionIsolationLevel;
import com.zone.mybatis.transaction.Transaction;
import com.zone.mybatis.transaction.TransactionFactory;

import javax.sql.DataSource;

/**
 * @author: zongzi
 * @description: TODO
 * @date: 2023/12/21
 */
public class JdbcTransactionFactory implements TransactionFactory {

    @Override
    public Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel transactionIsolationLevel, boolean autoCommit) {
        return new JdbcTransaction(dataSource, transactionIsolationLevel, autoCommit);
    }
}
